import random
from argparse import ArgumentParser

parser=ArgumentParser()
parser.add_argument(
    "--file_list_path",
    required=True,
    type=str,
)
parser.add_argument(
    "--nums",
    type=int,
    default=10,
)
args=parser.parse_args()


src = open('data/coco2014/custom_val.txt', 'r').read().splitlines()
tgt_path = args.file_list_path
with open(tgt_path, 'w') as tgt_file: 
    random.shuffle(src)
    content=src[:args.nums]
    tgt_file.write('\n'.join(content))
print(f'write {args.nums} paths to {tgt_path}')